import request from '@/utils/request';

/**
 * 保存修改日程信息
 * @param data
 * @returns {AxiosPromise}
 */
export function saveSchedule(data) {
  return request({
    url: 'rest/api/template/schedule/saveSchedule',
    method: 'post',
    data
  });
}

/**
 * 分页查询自己发起的日程
 * @param data
 * @returns {AxiosPromise}
 */
export function queryAllScheduleByPage(params) {
  return request({
    url: 'rest/api/template/schedule/queryPager',
    method: 'get',
    params
  });
}

/**
 * 条件查询个人日程信息
 * @param data
 * @returns {AxiosPromise}
 */
export function queryAllMyScheduleByPage(params) {
  return request({
    url: 'rest/api/template/schedule/queryMySchedulePager',
    method: 'get',
    params
  });
}

/**
 * 删除日程信息
 * @param params
 * @returns {AxiosPromise}
 */
export function deleteObject(params) {
  return request({
    url: 'rest/api/template/schedule/deleteSchedule',
    method: 'get',
    params
  });
}

/**
 * 查询日程详情详情
 * @param params
 * @returns {AxiosPromise}
 */
export function getEntity(params) {
  return request({
    url: 'rest/api/template/schedule/getScheduleInfo',
    method: 'get',
    params
  });
}
